from celery import Celery
import os


if not os.getenv('DJANGO_SETTINGS_MODULE'):
    os.environ['DJANGO_SETTINGS_MODULE'] = 'scf.settings.dev'

celery_app = Celery('meiduo')
celery_app.config_from_object('celery_tasks.config')
# 让 celery_app 自动捕获目标地址下的任务:
# 就是自动捕获 tasks
celery_app.autodiscover_tasks(['celery_tasks.sms', 'celery_tasks.emails'])